#[tauri::command]
pub fn get_target_arch_to_store() -> String {
    #[cfg(target_arch = "x86_64")]
    {
        return "amd64-store".to_string();
    }

    #[cfg(target_arch = "aarch64")]
    {
        return "arm64-store".to_string();
    }

    #[cfg(target_arch = "loongarch64")]
    {
        return "loong64-store".to_string();
    }
}

#[tauri::command]
pub fn get_json_server_url() -> String {
    let arch = get_target_arch_to_store();
    return format!("https://cdn.d.store.deepinos.org.cn/{}/", arch);
}

#[tauri::command]
pub fn get_img_server_url() -> String {
    let arch = get_target_arch_to_store();
    return format!("https://spk-json.spark-app.store/{}/", arch);
}
